package xyz.xiangyushui.controller.employeeLeader;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import xyz.xiangyushui.dao.salesPlan.SalesPlanDao;

/**
 * Servlet implementation class EmployeeLeader
 */
@WebServlet("/employeeLeader")
public class EmployeeLeader extends HttpServlet {
	private static final long serialVersionUID = 1L;
	private SalesPlanDao spd;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public EmployeeLeader() {
        super();
        spd=new SalesPlanDao();
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		request.setAttribute("toBeModified", spd.getSalesPlanRejected((int) request.getSession(false).getAttribute("storeId")));
		request.getRequestDispatcher("/employeeLeader/salesPlan/index.jsp").forward(request, response);
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request, response);
	}
	
	

}
